GString *buf = g_string_new ("");
g_autoptr(GBytes) bytes = NULL;
guint i;
- gs_unref_hashtable GHashTable *written_overrides = NULL;
+ g_autoptr(GHashTable) written_overrides = NULL;
written_overrides = g_hash_table_new (g_str_hash, g_str_equal);
GError **error)
{
gboolean ret = FALSE;
- gs_unref_hashtable GHashTable *to_clean_dirs = NULL;
+ g_autoptr(GHashTable) to_clean_dirs = NULL;
GHashTableIter iter;
gpointer key, value;
}
else
{
- gs_unref_hashtable GHashTable *dir_metadata_checksums = NULL;
- gs_unref_hashtable GHashTable *dir_contents_checksums = NULL;
+ g_autoptr(GHashTable) dir_metadata_checksums = NULL;
+ g_autoptr(GHashTable) dir_contents_checksums = NULL;
gs_unref_variant GVariant *serialized_tree = NULL;
g_autofree guchar *contents_csum = NULL;
char contents_checksum_buf[65];
gboolean ret = FALSE;
GHashTableIter hash_iter;
gpointer key, value;
- gs_unref_hashtable GHashTable *objects = NULL;
- gs_unref_hashtable GHashTable *all_refs = NULL;
+ g_autoptr(GHashTable) objects = NULL;
+ g_autoptr(GHashTable) all_refs = NULL;
OtPruneData data = { 0, };
gboolean refs_only = flags & OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY;
g_autofree char *path = NULL;
g_autofree char *baseurl = NULL;
g_autofree char *metalink_url_str = NULL;
- gs_unref_hashtable GHashTable *requested_refs_to_fetch = NULL;
- gs_unref_hashtable GHashTable *commits_to_fetch = NULL;
+ g_autoptr(GHashTable) requested_refs_to_fetch = NULL;
+ g_autoptr(GHashTable) commits_to_fetch = NULL;
g_autofree char *remote_mode_str = NULL;
glnx_unref_object OstreeMetalink *metalink = NULL;
OtPullData pull_data_real = { 0, };
gboolean ret = FALSE;
static const char hexchars[] = "0123456789abcdef";
gsize off;
- gs_unref_hashtable GHashTable *ref_list = NULL;
+ g_autoptr(GHashTable) ref_list = NULL;
g_autofree char *ret_rev = NULL;
guint length;
const char *checksum = NULL;
GError **error)
{
gboolean ret = FALSE;
- gs_unref_hashtable GHashTable *ret_all_refs = NULL;
+ g_autoptr(GHashTable) ret_all_refs = NULL;
g_autofree char *remote = NULL;
g_autofree char *ref_prefix = NULL;
gboolean ret = FALSE;
gs_unref_ptrarray GPtrArray *ret_sizenames =
g_ptr_array_new_with_free_func (_ostree_delta_content_sizenames_free);
- gs_unref_hashtable GHashTable *sizenames_map =
+ g_autoptr(GHashTable) sizenames_map =
g_hash_table_new_full (g_str_hash, g_str_equal, NULL, _ostree_delta_content_sizenames_free);
ostree_cleanup_repo_commit_traverse_iter
OstreeRepoCommitTraverseIter iter = { 0, };
GError **error)
{
gboolean ret = FALSE;
- gs_unref_hashtable GHashTable *ret_modified_regfile_content =
+ g_autoptr(GHashTable) ret_modified_regfile_content =
g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify)g_ptr_array_unref);
gs_unref_ptrarray GPtrArray *from_sizes = NULL;
gs_unref_ptrarray GPtrArray *to_sizes = NULL;
GError **error)
{
gboolean ret = FALSE;
- gs_unref_hashtable GHashTable *from_bsdiff = NULL;
- gs_unref_hashtable GHashTable *to_bsdiff = NULL;
+ g_autoptr(GHashTable) from_bsdiff = NULL;
+ g_autoptr(GHashTable) to_bsdiff = NULL;
g_autoptr(GBytes) tmp_from = NULL;
g_autoptr(GBytes) tmp_to = NULL;
g_autoptr(GFileInfo) from_finfo = NULL;
GError **error)
{
gboolean ret = FALSE;
- gs_unref_hashtable GHashTable *from_rollsum = NULL;
- gs_unref_hashtable GHashTable *to_rollsum = NULL;
+ g_autoptr(GHashTable) from_rollsum = NULL;
+ g_autoptr(GHashTable) to_rollsum = NULL;
g_autoptr(GBytes) tmp_from = NULL;
g_autoptr(GBytes) tmp_to = NULL;
g_autoptr(GFileInfo) from_finfo = NULL;
gs_unref_variant GVariant *from_commit = NULL;
g_autoptr(GFile) root_to = NULL;
gs_unref_variant GVariant *to_commit = NULL;
- gs_unref_hashtable GHashTable *to_reachable_objects = NULL;
- gs_unref_hashtable GHashTable *from_reachable_objects = NULL;
- gs_unref_hashtable GHashTable *from_regfile_content = NULL;
- gs_unref_hashtable GHashTable *new_reachable_metadata = NULL;
- gs_unref_hashtable GHashTable *new_reachable_regfile_content = NULL;
- gs_unref_hashtable GHashTable *new_reachable_symlink_content = NULL;
- gs_unref_hashtable GHashTable *modified_regfile_content = NULL;
- gs_unref_hashtable GHashTable *rollsum_optimized_content_objects = NULL;
- gs_unref_hashtable GHashTable *bsdiff_optimized_content_objects = NULL;
- gs_unref_hashtable GHashTable *content_object_to_size = NULL;
+ g_autoptr(GHashTable) to_reachable_objects = NULL;
+ g_autoptr(GHashTable) from_reachable_objects = NULL;
+ g_autoptr(GHashTable) from_regfile_content = NULL;
+ g_autoptr(GHashTable) new_reachable_metadata = NULL;
+ g_autoptr(GHashTable) new_reachable_regfile_content = NULL;
+ g_autoptr(GHashTable) new_reachable_symlink_content = NULL;
+ g_autoptr(GHashTable) modified_regfile_content = NULL;
+ g_autoptr(GHashTable) rollsum_optimized_content_objects = NULL;
+ g_autoptr(GHashTable) bsdiff_optimized_content_objects = NULL;
+ g_autoptr(GHashTable) content_object_to_size = NULL;
if (from != NULL)
{
GError **error)
{
gboolean ret = FALSE;
- gs_unref_hashtable GHashTable *ret_reachable =
+ g_autoptr(GHashTable) ret_reachable =
ostree_repo_traverse_new_reachable ();
if (!ostree_repo_traverse_commit_union (repo, commit_checksum, maxdepth,
GError **error)
{
gboolean ret = FALSE;
- gs_unref_hashtable GHashTable *ret_objects = NULL;
+ g_autoptr(GHashTable) ret_objects = NULL;
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
g_return_val_if_fail (self->inited, FALSE);
GError **error)
{
gboolean ret = FALSE;
- gs_unref_hashtable GHashTable *ret_commits = NULL;
+ g_autoptr(GHashTable) ret_commits = NULL;
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
g_return_val_if_fail (self->inited, FALSE);
GError **error)
{
gboolean ret = FALSE;
- gs_unref_hashtable GHashTable *refs = NULL;
+ g_autoptr(GHashTable) refs = NULL;
gs_unref_variant_builder GVariantBuilder *refs_builder = NULL;
gs_unref_variant GVariant *summary = NULL;
GList *ordered_keys = NULL;
GBytes *to)
{
OstreeRollsumMatches *ret_rollsum = NULL;
- gs_unref_hashtable GHashTable *from_rollsum = NULL;
- gs_unref_hashtable GHashTable *to_rollsum = NULL;
+ g_autoptr(GHashTable) from_rollsum = NULL;
+ g_autoptr(GHashTable) to_rollsum = NULL;
gs_unref_ptrarray GPtrArray *matches = NULL;
const guint8 *from_buf;
gsize from_len;
gboolean ret = FALSE;
struct stat root_stbuf;
guint i;
- gs_unref_hashtable GHashTable *active_deployment_dirs = NULL;
- gs_unref_hashtable GHashTable *active_boot_checksums = NULL;
+ g_autoptr(GHashTable) active_deployment_dirs = NULL;
+ g_autoptr(GHashTable) active_boot_checksums = NULL;
gs_unref_ptrarray GPtrArray *all_deployment_dirs = NULL;
gs_unref_ptrarray GPtrArray *all_boot_dirs = NULL;
{
gboolean ret = FALSE;
g_autofree char *prefix = NULL;
- gs_unref_hashtable GHashTable *refs = NULL;
+ g_autoptr(GHashTable) refs = NULL;
GHashTableIter hashiter;
gpointer hashkey, hashvalue;
glnx_fd_close int deployment_dfd = -1;
g_autofree char *contents = NULL;
g_autofree char *deployment_version = NULL;
- gs_unref_hashtable GHashTable *osrelease_values = NULL;
+ g_autoptr(GHashTable) osrelease_values = NULL;
g_autofree char *linux_relpath = NULL;
g_autofree char *linux_key = NULL;
g_autofree char *initramfs_relpath = NULL;
{
gboolean ret = FALSE;
guint i;
- gs_unref_hashtable GHashTable *created_current_for_osname =
+ g_autoptr(GHashTable) created_current_for_osname =
g_hash_table_new (g_str_hash, g_str_equal);
for (i = 0; i < self->deployments->len; i++)
gboolean ret = FALSE;
gsize len;
char **iter = NULL; /* nofree */
- gs_unref_hashtable GHashTable *ret_hash = NULL;
+ g_autoptr(GHashTable) ret_hash = NULL;
g_autoptr(GFile) path = NULL;
g_autofree char *contents = NULL;
char **lines = NULL;
gs_unref_variant GVariant *detached_metadata = NULL;
glnx_unref_object OstreeMutableTree *mtree = NULL;
g_autofree char *tree_type = NULL;
- gs_unref_hashtable GHashTable *mode_adds = NULL;
+ g_autoptr(GHashTable) mode_adds = NULL;
OstreeRepoCommitModifierFlags flags = 0;
OstreeRepoCommitModifier *modifier = NULL;
OstreeRepoTransactionStats stats;
if (opt_stats)
{
- gs_unref_hashtable GHashTable *reachable_a = NULL;
- gs_unref_hashtable GHashTable *reachable_b = NULL;
- gs_unref_hashtable GHashTable *reachable_intersection = NULL;
+ g_autoptr(GHashTable) reachable_a = NULL;
+ g_autoptr(GHashTable) reachable_b = NULL;
+ g_autoptr(GHashTable) reachable_intersection = NULL;
g_autofree char *rev_a = NULL;
g_autofree char *rev_b = NULL;
g_autofree char *size = NULL;
gboolean ret = FALSE;
GHashTableIter hash_iter;
gpointer key, value;
- gs_unref_hashtable GHashTable *reachable_objects = NULL;
+ g_autoptr(GHashTable) reachable_objects = NULL;
guint i;
guint mod;
guint count;
gpointer key, value;
gboolean found_corruption = FALSE;
guint n_partial = 0;
- gs_unref_hashtable GHashTable *objects = NULL;
- gs_unref_hashtable GHashTable *commits = NULL;
+ g_autoptr(GHashTable) objects = NULL;
+ g_autoptr(GHashTable) commits = NULL;
context = g_option_context_new ("- Check the repository for consistency");
g_autofree char *src_repo_uri = NULL;
glnx_unref_object OstreeAsyncProgress *progress = NULL;
gs_unref_ptrarray GPtrArray *refs_to_fetch = NULL;
- gs_unref_hashtable GHashTable *source_objects = NULL;
+ g_autoptr(GHashTable) source_objects = NULL;
context = g_option_context_new ("SRC_REPO [REFS...] - Copy data from SRC_REPO");
{
g_autoptr(GFile) src_repo_path = g_file_new_for_path (src_repo_arg);
glnx_unref_object OstreeRepo *src_repo = ostree_repo_new (src_repo_path);
- gs_unref_hashtable GHashTable *refs_to_clone = NULL;
+ g_autoptr(GHashTable) refs_to_clone = NULL;
refs_to_fetch = g_ptr_array_new_with_free_func (g_free);
GOptionContext *context;
glnx_unref_object OstreeRepo *repo = NULL;
const char *refspec_prefix = NULL;
- gs_unref_hashtable GHashTable *refs = NULL;
+ g_autoptr(GHashTable) refs = NULL;
GHashTableIter hashiter;
gpointer hashkey, hashvalue;
GCancellable *cancellable,
GError **error)
{
- gs_unref_hashtable GHashTable *refs = NULL;
+ g_autoptr(GHashTable) refs = NULL;
gchar *ret;
if (!ostree_repo_list_refs (repo, NULL, &refs, cancellable, error))